import QtQuick 2.5
import "../Widgets"

Item {
    id:root
    signal dataImportClicked()
    signal fullSearchClicked()
    signal compareClicked()
    signal settingClicked()
    signal versionClicked()
    signal analyClicked()
    Image {
        id: background
        source: "qrc:/UI/imgSource/leftbackground.png"
        anchors.fill: parent
        fillMode: Image.Stretch
    }
    //logo
    Image {
        id: logoTop
        source: "qrc:/UI/imgSource/logotop.png"
        width: root.width-5
        height:width/(sourceSize.width/sourceSize.height)
        y:60
    }
    //line
    Rectangle{
        anchors.right: parent.right
        width: 1
        height:parent.height
        color:"#101010"
    }

    //list
    Column{
        anchors.centerIn: parent
        spacing: 15
        //数据导入
        AnimateButton{
            id:dataimportbnt
            width: root.width-25
            height:60
            bntText: "数据导入"
            imgSourece: "qrc:/UI/imgSource/dataimport.png"
            selected: true
            onBntClicked: {
                dataimportbnt.selected=true;
                fullsearchbnt.selected=false;
                comparebnt.selected=false;
                analybnt.selected=false;
                settingbnt.selected=false;
                versionbnt.selected=false;
                dataImportClicked();
            }
        }

        //全管查询
        AnimateButton{
            id:fullsearchbnt
            width: root.width-25
            height:60
            bntText: "全管查询"
            imgSourece: "qrc:/UI/imgSource/fullsearch.png"
            onBntClicked: {
                dataimportbnt.selected=false;
                fullsearchbnt.selected=true;
                comparebnt.selected=false;
                analybnt.selected=false;
                settingbnt.selected=false;
                versionbnt.selected=false;
                fullSearchClicked();
            }
        }

        //管管比较
        AnimateButton{
            id:comparebnt
            width: root.width-25
            height:60
            bntText: "管管比较"
            imgSourece: "qrc:/UI/imgSource/compare.png"
            onBntClicked: {
                dataimportbnt.selected=false;
                fullsearchbnt.selected=false;
                comparebnt.selected=true;
                analybnt.selected=false;
                settingbnt.selected=false;
                versionbnt.selected=false;
                compareClicked();
            }
        }

        //结焦诊断
        AnimateButton{
            id:analybnt
            width: root.width-25
            height:60
            bntText: "结焦诊断"
            imgSourece: "qrc:/UI/imgSource/analise.png"
            onBntClicked: {
                dataimportbnt.selected=false;
                fullsearchbnt.selected=false;
                comparebnt.selected=false;
                analybnt.selected=true;
                settingbnt.selected=false;
                versionbnt.selected=false;
                analyClicked();
            }
        }

        //参数设置
        AnimateButton{
            id:settingbnt
            width: root.width-25
            height:60
            bntText: "参数设置"
            imgSourece: "qrc:/UI/imgSource/setting.png"
            onBntClicked: {
                dataimportbnt.selected=false;
                fullsearchbnt.selected=false;
                comparebnt.selected=false;
                analybnt.selected=false;
                settingbnt.selected=true;
                versionbnt.selected=false;
                settingClicked();
            }
        }

        //版本信息
        AnimateButton{
            id:versionbnt
            width: root.width-25
            height:60
            bntText: "版本信息"
            imgSourece: "qrc:/UI/imgSource/version.png"
            onBntClicked: {
                dataimportbnt.selected=false;
                fullsearchbnt.selected=false;
                comparebnt.selected=false;
                analybnt.selected=false;
                settingbnt.selected=false;
                versionbnt.selected=true;
                versionClicked();
            }
        }
    }

}

